package main

import (
	"fmt"
)

func main() {
	var x mover
	p:=person{"huazi"}
	c:=car{"db"}
	x=&p
	x.move()
	x=c
	c.move()
	fmt.Println(p.name)
	fmt.Println(c.name)


}

type mover interface {
	move()
}
type person struct {
	name string
}
type car struct {
	name string
}

func (p *person)move()  {
	p.name="张华"
}
func (c car)move()  {
	c.name="奔驰"
}
